import request from '@/router/axios';

// 查看领养任务列表
export function getConfigList(params) {
  return request({
    url: '/core/config/job/adopt/page',
    method: 'get',
    params,
  });
}
//新增
export function insertConfigJob(data) {
  return request({
    url: '/core/config/job/adopt',
    method: 'post',
    data,
  });
}
//编辑
export function updateConfigJobById(data) {
  return request({
    url: '/core/config/job/adopt',
    method: 'put',
    data,
  });
}
//通过id查询
export function getConfigListById(id) {
  return request({
    url: `/core/config/job/adopt/${id}`,
    method: 'get',
  });
}
//通过id删除
export function getConfigJobById(id) {
  return request({
    url: `/core/config/job/adopt/${id}`,
    method: 'delete',
  });
}
//关联问题列表
export function getRelatelist(params) {
  return request({
    url: '/core/survey/page',
    method: 'get',
    params,
  });
}
//新增关联
export function insertSurvey(data) {
  return request({
    url: '/core/survey',
    method: 'post',
    data,
  });
}
//通过id查询
export function selectSurveyById(id) {
  return request({
    url: `/core/survey/${id}`,
    method: 'get',
  });
}
//通过id删除
export function deleteSurveyById(id) {
  return request({
    url: `/core/survey/${id}`,
    method: 'delete',
  });
}
//编辑关联问题
export function updateSurvey(data) {
  return request({
    url: '/core/survey',
    method: 'put',
    data,
  });
}
